<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增参数设置')" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-config-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">提现百分比：</label>
                <div class="col-sm-8">
                    <input name="handFee" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">转账提现开关：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_switch_state')}">
                        <input type="radio" th:id="${'transferSwitch_' + dict.dictCode}" name="transferSwitch" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
                        <label th:for="${'transferSwitch_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">充值开关：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_switch_state')}">
                        <input type="radio" th:id="${'rechargeSwitch_' + dict.dictCode}" name="rechargeSwitch" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
                        <label th:for="${'rechargeSwitch_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付宝提现开关：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_switch_state')}">
                        <input type="radio" th:id="${'wAlipaySwitch_' + dict.dictCode}" name="wAlipaySwitch" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
                        <label th:for="${'wAlipaySwitch_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">微信提现开关：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_switch_state')}">
                        <input type="radio" th:id="${'wWechatSwitch_' + dict.dictCode}" name="wWechatSwitch" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
                        <label th:for="${'wWechatSwitch_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">udst提现开关：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_switch_state')}">
                        <input type="radio" th:id="${'wUsdtSwitch_' + dict.dictCode}" name="wUsdtSwitch" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
                        <label th:for="${'wUsdtSwitch_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">银行卡提现开关：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_switch_state')}">
                        <input type="radio" th:id="${'wBankSwitch_' + dict.dictCode}" name="wBankSwitch" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
                        <label th:for="${'wBankSwitch_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">登录开关：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_switch_state')}">
                        <input type="radio" th:id="${'loginSwitch_' + dict.dictCode}" name="loginSwitch" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
                        <label th:for="${'loginSwitch_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">注册开关：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_switch_state')}">
                        <input type="radio" th:id="${'registerSwitch_' + dict.dictCode}" name="registerSwitch" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
                        <label th:for="${'registerSwitch_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">usdt换余额：</label>
                <div class="col-sm-8">
                    <input name="usdtToRmb" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">推荐奖：</label>
                <div class="col-sm-8">
                    <input name="reAward" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">团队奖：</label>
                <div class="col-sm-8">
                    <input name="teamAward" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">公司usdt：</label>
                <div class="col-sm-8">
                    <input name="usdt" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">微信收款码：</label>
                <div class="col-sm-8">
                    <input type="hidden" name="wechatCode">
                    <div class="file-loading">
                        <input class="form-control file-upload" id="wechatCode" name="file" type="file">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">支付宝收款码：</label>
                <div class="col-sm-8">
                    <input type="hidden" name="alipayCode">
                    <div class="file-loading">
                        <input class="form-control file-upload" id="alipayCode" name="file" type="file">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">银行卡：</label>
                <div class="col-sm-8">
                    <input name="bankCard" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">开户姓名：</label>
                <div class="col-sm-8">
                    <input name="accountName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">开户银行：</label>
                <div class="col-sm-8">
                    <input name="bankAccount" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "config/config"
        $("#form-config-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-config-add').serialize());
            }
        }

        $(".file-upload").fileinput({
            uploadUrl:  ctx+'common/upload',
            maxFileCount: 1,
            autoReplace: true
        }).on('fileuploaded', function (event, data, previewId, index) {
            $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
        }).on('fileremoved', function (event, id, index) {
            $("input[name='" + event.currentTarget.id + "']").val('')
        })
    </script>
</body>
</html>